package com.zofer.study.chainOfResponsibility;

/**
 * @description 责任链模式
 * 申请费用，小于100项目经理审批,大于100小于等于500部门经理审批,大于500总经理审批
 * @date: 2020/10/10 15:49
 * @author zofer
 */
public class Main {

    public static void main(String[] args) {
        Handler projectManager = new ProjectManager();
        Handler deptManager = new DeptManager();
        Handler generalManager = new GeneralManager();
        //设置项目经理上级是部门经理
        projectManager.setNextHandler(deptManager);
        //设置部门经理上级是总经理
        deptManager.setNextHandler(generalManager);
        //请求费用
        projectManager.applyFee(501);
    }
}
